<?php

declare(strict_types=1);

namespace app\common\model\sys;

use think\Model;
use think\model\concern\SoftDelete;
use app\common\traits\ModelTrait;

/**
 * 应用客户端-模型
 * @author:kaige
 * @update:2022-06-12
 * @copyright ©2022 泉州市盛筑信息科技有限公司 版权所有
 */
class SysClient extends Model
{
    use SoftDelete;
    //软删除时间
    protected $deleteTime = 'delete_time';
    //软删除字段的默认值
    protected $defaultSoftDelete = 0;
    //开启自动写入时间戳字段
    protected $autoWriteTimestamp = true;
    protected $createTime = 'create_time';
    protected $updateTime = 'update_time';

    // 设置字段信息(避免多一次查询的开销)
    protected $schema = [
        'id'            => 'int',
        'type'          => 'int',
        'app_id'        => 'string',
        'app_salt'      => 'string',
        'name'          => 'string',
        'reg_ip'        => 'string',
        'last_time'     => 'int',
        'last_ip'       => 'string',
        'desc'          => 'string',
        'status'        => 'int',
        'create_time'   => 'int',
        'update_time'   => 'int',
        'delete_time'   => 'int',
    ];

    use ModelTrait;
}
